import request from '@/utils/request'

export async function getSystemParameterListApi(params) {
  var resp = await request({
    url: '/system_settings/list/',
    method: 'get',
    params
  })
  return resp
}

export async function updateSystemParameterListApi(id, data) {
  var resp = await request({
    url: '/system_settings/list/' + id + '/',
    method: 'put',
    data
  })
  return resp
}

export async function getLogsDirectoryStructureApi() {
  return await request({
    url: '/system_settings/logs_directory_structure/',
    method: 'get'
  })
}

export async function getLogsFileListApi(params) {
  return await request({
    url: '/system_settings/logs_file_handles/',
    method: 'get',
    params
  })
}

export async function downloadLogFileApi(params) {
  return await request({
    url: '/system_settings/download_log_file/',
    method: 'get',
    params
  })
}

export async function deleteLogFileApi(data) {
  var resp = await request({
    url: '/system_settings/delete_log_file/',
    method: 'post',
    data
  })
  return resp
}

export async function deleteLogFolderApi(data) {
  var resp = await request({
    url: '/system_settings/delete_log_folder/',
    method: 'post',
    data
  })
  return resp
}
